package com.wh.music.service;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.wh.music.POJO.Singer;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

public interface SingerService {
  /**
   *增加
   */
  public int insertsinger(Singer singer);

  /**
   *修改
   */
  public int updatesinger(Singer singer);

  /**
   * 删除
   */
  public int deletesinger(Long id);

  public int deletesingers(List<Long> ids);

  @Transactional(readOnly = true)
  public Singer queryByPrimaryKey(Long id);

  /**
   * 查询所有歌手
   */
  @Transactional(readOnly = true)
  public List<Singer> queryAllSinger();

  @Transactional(readOnly = true)
  public Page<Singer> findByPage(int pageNo, int pageSize, String name);

  @Transactional(readOnly = true)
  public Integer countSingers(String name);

  @Transactional(readOnly = true)
  public List<Singer> queryByName(String name);

  @Transactional(readOnly = true)
  public List<Singer> queryBySex(Integer sex);
}
